package Controlador;

import Modelo.Policia;


public class MotorPolicia extends Thread {

   private Policia poli;
   private int tiempo=100;
   
   //hola


   public MotorPolicia (Policia policia) {
       poli= policia;
   }

        
    @Override
   public void run ()
   {
     // System.out.println("running!");
      try
      {
         while(poli.estado)
         {
            poli.avanzar();
            Thread.sleep(tiempo);
         }
      }catch (InterruptedException ex){
          throw new UnsupportedOperationException("Not supported yet.");
      }

   }

}
